package com.pzb.order.domain;

import java.util.Date;
import java.util.List;

import com.alibaba.fastjson.JSONArray;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pzb.market.domain.MkDiscount;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.pzb.common.core.domain.BaseEntity;

/**
 * 订单管理对象 od_order
 * 
 * @author Mr_Wu
 * @date 2022-03-09
 */
public class OdOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 商户ID */
    private String extAppid;

    /** 用户ID */
    private String openid;

    /** 订单编号 */
    private String orderCode;

    /** 支付方式：0 微信 */
    private String paymentMethod;

    /** 商品总数量 */
    private Integer totalQuantity;

    /** 订单总金额 */
    private String totalAmount;

    /** 优惠券编号 */
    private Long couponId;

    /** 使用积分 */
    private Long integral;

    /** 优惠金额 */
    private String discountAmount;

    /** 积分抵扣金额 */
    private String integralAmount;

    /** 实际支付金额 */
    private String payAmount;

    /** 优惠券优惠金额 */
    private String couponAmount;

    /** 收货方式，0为快递配送，1为上门自提 */
    private String deliveryMethod;

    /** 活动编号 */
    private Long discountId;

    private MkDiscount discount;

    /** 收件人 */
    private String receiver;

    /** 收件电话 */
    private String phone;

    /** 活动赠品id */
    private Long giftId;

    /** 收件地址 */
    private String address;

    /** 运费 */
    private String expressAmount;

    /** 用户备注 */
    private String userRemarks;

    /** 余额支付金额 */
    private String balanceAmount;

    /** 订单支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /** 实际支付总金额 */
    private String payTotalAmount;

    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryTime;

    /** 订单完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date finishTime;

    /** 订单状态：0待支付，1待发货，2已发货，3已完成 */
    private String orderStatus;

    private String payStatus;

    /** 快递公司名称 */
    private String expressCompany;

    /** 地区编码 */
    private String areaCode;

    private JSONArray areaCodeArray;

    /** 快递单号 */
    private String expressNumber;

    /** 标记：0红色，1黄色，2绿色，3蓝色，4紫色 */
    private String orderSign;

    /** 标记备注 */
    private String signRemarks;

    /** 收件完整地址 */
    private String fullAddress;

    /** 订单类型：0普通订单 1拼购订单 */
    private String orderType;

    /** 拼购状态：0成功 1失败 */
    private String groupStatus;

    private List<OdOrderDetail> orderDetailList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setExtAppid(String extAppid) 
    {
        this.extAppid = extAppid;
    }

    public String getExtAppid() 
    {
        return extAppid;
    }
    public void setOpenid(String openid) 
    {
        this.openid = openid;
    }

    public String getOpenid() 
    {
        return openid;
    }
    public void setOrderCode(String orderCode) 
    {
        this.orderCode = orderCode;
    }

    public String getOrderCode() 
    {
        return orderCode;
    }
    public void setPaymentMethod(String paymentMethod) 
    {
        this.paymentMethod = paymentMethod;
    }

    public String getPaymentMethod() 
    {
        return paymentMethod;
    }
    public void setTotalQuantity(Integer totalQuantity) 
    {
        this.totalQuantity = totalQuantity;
    }

    public Integer getTotalQuantity() 
    {
        return totalQuantity;
    }
    public void setTotalAmount(String totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public String getTotalAmount()
    {
        return totalAmount;
    }
    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }
    public void setIntegral(Long integral) 
    {
        this.integral = integral;
    }

    public Long getIntegral() 
    {
        return integral;
    }
    public void setDiscountAmount(String discountAmount)
    {
        this.discountAmount = discountAmount;
    }

    public String getDiscountAmount()
    {
        return discountAmount;
    }
    public void setIntegralAmount(String integralAmount)
    {
        this.integralAmount = integralAmount;
    }

    public String getIntegralAmount()
    {
        return integralAmount;
    }
    public void setPayAmount(String payAmount)
    {
        this.payAmount = payAmount;
    }

    public String getPayAmount()
    {
        return payAmount;
    }
    public void setCouponAmount(String couponAmount)
    {
        this.couponAmount = couponAmount;
    }

    public String getCouponAmount()
    {
        return couponAmount;
    }
    public void setDeliveryMethod(String deliveryMethod) 
    {
        this.deliveryMethod = deliveryMethod;
    }

    public String getDeliveryMethod() 
    {
        return deliveryMethod;
    }
    public void setDiscountId(Long discountId) 
    {
        this.discountId = discountId;
    }

    public Long getDiscountId() 
    {
        return discountId;
    }

    public MkDiscount getDiscount() {
        return discount;
    }

    public void setDiscount(MkDiscount discount) {
        this.discount = discount;
    }

    public void setReceiver(String receiver)
    {
        this.receiver = receiver;
    }

    public String getReceiver() 
    {
        return receiver;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setGiftId(Long giftId) 
    {
        this.giftId = giftId;
    }

    public Long getGiftId() 
    {
        return giftId;
    }
    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }
    public void setExpressAmount(String expressAmount)
    {
        this.expressAmount = expressAmount;
    }

    public String getExpressAmount()
    {
        return expressAmount;
    }
    public void setUserRemarks(String userRemarks) 
    {
        this.userRemarks = userRemarks;
    }

    public String getUserRemarks() 
    {
        return userRemarks;
    }
    public void setBalanceAmount(String balanceAmount)
    {
        this.balanceAmount = balanceAmount;
    }

    public String getBalanceAmount()
    {
        return balanceAmount;
    }
    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }
    public void setPayTotalAmount(String payTotalAmount)
    {
        this.payTotalAmount = payTotalAmount;
    }

    public String getPayTotalAmount()
    {
        return payTotalAmount;
    }
    public void setDeliveryTime(Date deliveryTime) 
    {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime() 
    {
        return deliveryTime;
    }
    public void setFinishTime(Date finishTime) 
    {
        this.finishTime = finishTime;
    }

    public Date getFinishTime() 
    {
        return finishTime;
    }
    public void setOrderStatus(String orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatus() 
    {
        return orderStatus;
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public void setExpressCompany(String expressCompany)
    {
        this.expressCompany = expressCompany;
    }

    public String getExpressCompany() 
    {
        return expressCompany;
    }
    public void setAreaCode(String areaCode) 
    {
        this.areaCode = areaCode;
    }

    public String getAreaCode() 
    {
        return areaCode;
    }

    public JSONArray getAreaCodeArray() {
        return areaCodeArray;
    }

    public void setAreaCodeArray(JSONArray areaCodeArray) {
        this.areaCodeArray = areaCodeArray;
    }

    public void setExpressNumber(String expressNumber)
    {
        this.expressNumber = expressNumber;
    }

    public String getExpressNumber() 
    {
        return expressNumber;
    }
    public void setOrderSign(String orderSign) 
    {
        this.orderSign = orderSign;
    }

    public String getOrderSign() 
    {
        return orderSign;
    }
    public void setSignRemarks(String signRemarks) 
    {
        this.signRemarks = signRemarks;
    }

    public String getSignRemarks() 
    {
        return signRemarks;
    }
    public void setFullAddress(String fullAddress) 
    {
        this.fullAddress = fullAddress;
    }

    public String getFullAddress() 
    {
        return fullAddress;
    }
    public void setOrderType(String orderType) 
    {
        this.orderType = orderType;
    }

    public String getOrderType() 
    {
        return orderType;
    }
    public void setGroupStatus(String groupStatus) 
    {
        this.groupStatus = groupStatus;
    }

    public String getGroupStatus() 
    {
        return groupStatus;
    }

    public List<OdOrderDetail> getOrderDetailList() {
        return orderDetailList;
    }

    public void setOrderDetailList(List<OdOrderDetail> orderDetailList) {
        this.orderDetailList = orderDetailList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("extAppid", getExtAppid())
            .append("openid", getOpenid())
            .append("orderCode", getOrderCode())
            .append("paymentMethod", getPaymentMethod())
            .append("totalQuantity", getTotalQuantity())
            .append("totalAmount", getTotalAmount())
            .append("couponId", getCouponId())
            .append("integral", getIntegral())
            .append("discountAmount", getDiscountAmount())
            .append("integralAmount", getIntegralAmount())
            .append("payAmount", getPayAmount())
            .append("couponAmount", getCouponAmount())
            .append("deliveryMethod", getDeliveryMethod())
            .append("discountId", getDiscountId())
            .append("receiver", getReceiver())
            .append("phone", getPhone())
            .append("giftId", getGiftId())
            .append("address", getAddress())
            .append("expressAmount", getExpressAmount())
            .append("userRemarks", getUserRemarks())
            .append("createTime", getCreateTime())
            .append("balanceAmount", getBalanceAmount())
            .append("payTime", getPayTime())
            .append("payTotalAmount", getPayTotalAmount())
            .append("deliveryTime", getDeliveryTime())
            .append("finishTime", getFinishTime())
            .append("orderStatus", getOrderStatus())
            .append("expressCompany", getExpressCompany())
            .append("areaCode", getAreaCode())
            .append("expressNumber", getExpressNumber())
            .append("orderSign", getOrderSign())
            .append("signRemarks", getSignRemarks())
            .append("fullAddress", getFullAddress())
            .append("orderType", getOrderType())
            .append("groupStatus", getGroupStatus())
            .toString();
    }
}
